package com.mingjie.daydayup;

import android.content.Intent;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class BActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_b);
//        Uri uri=getIntent().getData();
//        String result=uri.toString().substring(4);
//        System.out.println(result);
        Button btn= (Button) findViewById(R.id.btn_2a);
        btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent data = new Intent();
                Bundle bundle = new Bundle();
                bundle.putString("name", "wqj");
                bundle.putString("sex", "male");
                data.putExtras(bundle);
                setResult(1, data);
                finish();
            }
        });

    }
}
